<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Fetch one result row into array</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="function.odbc-fetch-array.html">« odbc_fetch_array</a></li>
      <li style="float: right;"><a href="function.odbc-fetch-object.html">odbc_fetch_object »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="ref.uodbc.html">ODBC 函数</a></li>
    <li>Fetch one result row into array</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="function.odbc-fetch-into" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">odbc_fetch_into</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">odbc_fetch_into</span> &mdash; <span class="dc-title">Fetch one result row into array</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.odbc-fetch-into-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>odbc_fetch_into</strong></span>(<span class="methodparam"><span class="type">resource</span> <code class="parameter">$statement</code></span>, <span class="methodparam"><span class="type">array</span> <code class="parameter reference">&$array</code></span>, <span class="methodparam"><span class="type">int</span> <code class="parameter">$row</code><span class="initializer"> = 0</span></span>): <span class="type"><span class="type">int</span>|<span class="type"><span class="type false">false</span></span></span></div>

  <p class="para rdfs-comment">
   Fetch one result row into <span class="type">array</span>.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.odbc-fetch-into-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>
    
     <dt>
<code class="parameter">statement</code></dt>

     <dd>

      <p class="para">
       The result <span class="type">resource</span>.
      </p>
     </dd>

    
    
     <dt>
<code class="parameter">array</code></dt>

     <dd>

      <p class="para">
       The result <span class="type">array</span>
       that can be of any type since it will be converted to type
       array. The array will contain the column values starting at array
       index 0.
      </p>
     </dd>

    
    
     <dt>
<code class="parameter">row</code></dt>

     <dd>

      <p class="para">
       The row number.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.odbc-fetch-into-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Returns the number of columns in the result;
   <strong><code>false</code></strong> on error.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.odbc-fetch-into-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-1008">
    <p><strong>示例 #1 <span class="function"><strong>odbc_fetch_into()</strong></span> examples</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$rc&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">odbc_fetch_into</span><span style="color: #007700">(</span><span style="color: #0000BB">$res_id</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$my_array</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

    <div class="example-contents"><p>
     or
    </p></div>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$rc&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">odbc_fetch_into</span><span style="color: #007700">(</span><span style="color: #0000BB">$res_id</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$my_array</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">2</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

   </div>
  </p>
 </div>

</div></div></div></body></html>